/**
 * @Package: 	com.group.JavaBean 
 * @author: 	Liu  
 * @date: 		Dec 26, 2018 11:48:38 AM 
 */
package com.group.JavaBean;

import com.group.DAO.GStudentDAO;

/**
 * @ClassName:	 GStudent.java
 * @Description: 学生类
 * @author:		 Liu
 * @date: 		 Dec 26, 2018 11:48:38 AM 
 */
public class GStudent {
	// @Fields studentID : 学生学号
	String studentID;
	// @Fields studentName : 学生姓名
	String studentName;
	// @Fields classID : 学生班级ID
	String classID;
	// @Fields groupID : 学生小组ID
	String groupID;
	// @Fields gclass : 学生班级
	GClass gclass;
	// @Fields ggroup : 学生小组
	GGroup ggroup;
	
	/**
	 * @Function: 	 GStudent.java
	 * @Description: 通过学生学号获取所在小组ID                
	 * @param:		   学生学号                        
	 * @return:		  小组ID                         
	 * @author: 	 Liu
	 * @date:		 Dec 28, 2018 10:17:14 PM 
	 */
	public int getGroupIDByID(String studentID) {
		GStudentDAO dao = new GStudentDAO();
		return dao.getGroupIDByID(studentID);
		
	}
	
	/**
	 * @Function: 	 GStudent.java
	 * @Description: 更新学生姓名                      
	 * @param:		   学号，姓名                     
	 * @return:		                             
	 * @author: 	 Liu
	 * @date:		 Dec 29, 2018 10:38:28 AM 
	 */
	public void updateStudentName(String studentID, String studentName) {
		GStudentDAO dao = new GStudentDAO();
		dao.updateStudentName(studentID, studentName);
	}
	
	/**
	 * @Function: 	 GStudent.java
	 * @Description: 更新学生所在小组                           
	 * @param:		   小组ID，学生ID列表                      
	 * @return:		                                    
	 * @author: 	 Liu
	 * @date:		 Dec 29, 2018 8:29:03 PM 
	 */
	public void updateStudentGruopIDByID(int groupID, String[] studentID) {
		GStudentDAO dao = new GStudentDAO();
		dao.updateStudentGruopIDByID(groupID, studentID);
	}
	
	
	public String getStudentID() {
		return studentID;
	}
	public void setStudentID(String studentID) {
		this.studentID = studentID;
	}
	public String getStudentName() {
		return studentName;
	}
	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}
	public String getClassID() {
		return classID;
	}
	public void setClassID(String classID) {
		this.classID = classID;
	}
	public String getGroupID() {
		return groupID;
	}
	public void setGroupID(String groupID) {
		this.groupID = groupID;
	}
	public GClass getGclass() {
		return gclass;
	}
	public void setGclass(GClass gclass) {
		this.gclass = gclass;
	}
	public GGroup getGgroup() {
		return ggroup;
	}
	public void setGgroup(GGroup ggroup) {
		this.ggroup = ggroup;
	}
	
}
